package com.flycms.esmodule.model;

import com.flycms.esmodule.constant.EsConstant;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.Date;

/**
 * @author huangzt
 * @version 1.0
 * @date 2020/3/16 15:25
 */
@Getter
@Setter
@Document(indexName = EsConstant.INDEX_NAME.SOLUTION, type = EsConstant.INDEX_NAME.TYPE)
public class EsSolution implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 解决方案id
     */
    @Id
    private Integer id;

    /**
     * 解决方案标题
     */
    @Field(type = FieldType.Keyword, analyzer = "ik_max_word")
    private String title;

    /**
     * 解决方案简介
     */
    @Field(type = FieldType.Keyword, analyzer = "ik_max_word")
    private String description;

    /**
     * 内容创建时间
     */
    private Date createTime;

    /**
     * 内容修改时间
     */
    private Date updateTime;

}
